﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SRF.Data.Mapping
{
    /// <summary>
    /// 数据映射，将数据映射为对象
    /// </summary>
    /// <typeparam name="TResult">类型</typeparam>
    public interface IDataMapper<TResult>
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="row"></param>
        /// <returns></returns>
        TResult MapRow(System.Data.IDataReader row);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="rows"></param>
        /// <returns></returns>
        IList<TResult> MapRows(System.Data.IDataReader rows);
    }
}